from finance_c2c.local_settings import DEBUG, ONLINE
from finance_c2c.local_settings import Config
from core.wchat.models import WxUserInfo

# OPENID = "o-OFyw6eu4xZmJ8dfHaJuQG3516k"  # 李超


# OPENID = "o-OFyw70A9yEKSJ0Jk-BB1BYgCac"  # 黄志远
# OPENID = "o-OFyw-NF4ejFbY_711zw1dJ6MVA"  # 刘总
# OPENID = "o-OFywxMFK_6axjTgXtFghj7d0eM"  # 静静
# OPENID = "o-OFyw9jFMGbKf_Zq3dQnBrIau1s"  # Cathy


# OPENID = "o-OFywz8g7W4oIeIyX2moTuJddEQ"  # 陈总
OPENID = "o-OFywwedi0PPJjEBjjIGtjdTCDg"  # 小零号

# OPENID = "o-OFyw1qJxtwH-C0Ef67vJP-YBJ0"  # 科盟
# OPENID = "o-OFyw1rnbNMoyd3zNoB5q_LxYME"  # 周涛
# OPENID = "o-OFyw209bjvFS_jrf2rVZGM0iZ4"  # 李华慧
# OPENID = "o-OFywwUzQ2Y2LC4gKZ5VhSCwI-o" # 雅梅
# OPENID = "o-OFyw-XYOg2e3WV0EMBsYVrJCK8" # 雅梅
# OPENID = "o-OFyw-zIktNBT9pPlnHu0GoxmI4" # 雅梅
# OPENID = "o-OFywyqoZN5NQF-qIF3eSdH1p2Q"  # 账号密码测试
# OPENID = "o-OFyw4ri9BfWj2o4lBwp9PL7iHo"  # 账号密码测试
# OPENID = "o-OFyw9XN8UcmMNmQcRNvG_hzmNk"  # 微信昵称黄瑞琦 黄瑞琪
# OPENID = "o-OFyw4qLe1Qn9724mxXQejUlMb8"  # 微信昵称Ricky 黄瑞琪


def get_wx_session(request):
    # return wx_obj
    # wx_obj = request.session[Config.session_key]
    if DEBUG == False and ONLINE == True:
        wx_obj = request.session[Config.session_key]
        wx_obj = WxUserInfo.objects.get(id=wx_obj.id)
    else:
        wx_obj = WxUserInfo.objects.get(openid=OPENID)
    return wx_obj
